import time


from selenium import webdriver
from selenium.webdriver import ActionChains, Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.select import Select
from selenium.webdriver.support.wait import WebDriverWait

driver = webdriver.Edge()

driver.get("http://www.sogou.com")
time.sleep(1)

ac = ActionChains(driver)
a=driver.find_element(By.PARTIAL_LINK_TEXT,'微信')
b=driver.find_element(By.ID,'query')

ac.drag_and_drop(a,b).perform()
ac.send_keys(Keys.ENTER).perform()

time.sleep(5)
